const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    port: 2333,
    proxy: {
      "^/fcj": {
        target: "http://www.lrfc.vip:1798",
        changeOrigin: true,
      },
      "^/hehe" : {
        target: "http://www.lrfc.vip:1798",
        changeOrigin: true,
        pathRewrite: {
          "^/hehe": "" // 将多余的路径替换掉
        }
      }
    }
  }
})

// 目标url "http://www.lrfc.vip:1798/fcj/music/rankSongList"
// 代码请求 http://localhost:2333/hehe/fcj/music/rankSongList
// 代理转发 http://www.lrfc.vip:1798/hehe/fcj/music/rankSongList